import request from '@/utils/request'
// 客户分类
export default {
  /**
 * @description: 获取投入类型管理类型树状图 *代表必填
 * @param {String/Number} page *
 * @param {String/Number} size *
 * @param {Object} entity {componyId: 1} *
 * @param {String} order 排序方式 ASC DESC 默认ASC
 * @param {String} sort 自定义排序方式 'createTime'
 * @return {Array}
 */
  // 添加
  add(params) {
    return request.post('/v3/inventory/saleOrderDetail/add', {...params,systemNo:sessionStorage.systemNo})
  },
  // 编号删除
  numberDel(params) {
    return request.get(`/v3/inventory/saleOrderDetail/delByNo?no=${params}`)
  },
  // 编号批量删除
  numberBatchDel(params) {
    return request.post('/v3/inventory/saleOrderDetail/delListByNo', params)
  },
  // 修改
  edit(params) {
    return request.post('/v3/inventory/saleOrderDetail/edit', params)
  },
  // 条件查询
  conditionQuery(params) {
    return request.post('/v3/inventory/saleOrderDetail/queryByCondition', {...params,systemNo:sessionStorage.systemNo})
  },
  // 编号查询
  numberQuery(params) {
    return request.get(`/v3/inventory/saleOrderDetail/queryByNo?no=${params}`)
  },
  // 编号批量查询
  numberBatchQuery(params) {
    return request.post('/v3/inventory/saleOrderDetail/queryListByNo', params)
  },
  // 分页查询
  pageQuery(params) {
    return request.post('/v3/inventory/saleOrderDetail/queryPageByCondition', {
      ...params,
      entity:{
        ...params.entity,
        systemNo:sessionStorage.systemNo
      }
    })
  },
  // 销售订单编号查询
  queryListBySaleOrderNo(no) {
    return request.get(`/v3/inventory/saleOrderDetail/queryListBySaleOrderNo?saleOrderNo=${no}`)
  }
}
